/* Global Styles */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background-color: #ffffff;
    color: #542b7a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Header */
header {
    background-color: #542b7a;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between; /* Espace entre le logo et les liens */
    align-items: center;
    max-width: 1200px;
    margin: auto;
}

.header-logo {
    max-width: 150px;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.1);
}

/* Navigation Links */
.header-nav {
    display: flex;
    align-items: center;
    gap: 20px; /* Espace entre les éléments */
}

.header-nav ul {
    display: flex;
    list-style: none; /* Supprime les puces de la liste */
    margin: 0;
    padding: 0;
}

.header-nav li {
    margin: 0;
}

.header-nav a {
    text-decoration: none; /* Supprime le soulignement */
    color: #ffffff; /* Couleur blanche */
    font-size: 1em;
    font-weight: bold;
    padding: 8px 15px; /* Ajoute un peu d'espace autour du texte */
    border-radius: 5px; /* Coins arrondis */
    transition: background-color 0.3s ease, color 0.3s ease; /* Animation de transition */
}

.header-nav a:hover {
    background-color: #fab34f; /* Couleur de fond survol */
    color: #542b7a; /* Couleur du texte survol */
}

/* Main Content */
.main-content {
    position: relative;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
    text-align: center;
    z-index: 10;
}

.text-content h1 {
    font-size: 2.5em;
    color: #542b7a;
    margin-bottom: 15px;
}

.subtext {
    font-size: 1.2em;
    color: #9756c9;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Input and Button */
.access-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.code-input {
    padding: 12px;
    font-size: 1.1em;
    border: 2px solid #542b7a;
    border-radius: 25px;
    text-align: center;
    width: 100%;
    max-width: 300px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
    transition: border 0.3s ease;
}

.connect-button {
    background-color: #fab34f;
    color: #fff;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.connect-button.disabled {
    background-color: rgba(250, 179, 79, 0.5);
    cursor: not-allowed;
}

.connect-button.success {
    animation: successBounce 0.6s ease-in-out;
    background-color: #28a745;
    color: #fff;
}

/* Animation au succès */
@keyframes successBounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Background Images */
.background-container {
    position: relative;
    width: 100%;
    height: auto;
    background-color: #f6f1f6;
}

.background-image {
    position: absolute;
    top: 0;
    width: 30%;
    opacity: 0.15;
    z-index: 1;
}

.background-left {
    left: 0;
}

.background-right {
    right: 0;
}

/* Footer */
footer {
    background-color: #2c2a2e; /* Couleur de fond solide */
    color: white;
    text-align: center;
    padding: 20px 10px;
    margin-top: auto;
    z-index: 100; /* Toujours au-dessus de l'image de fond */
    position: relative;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-links a {
    color: #ffffffcb;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Réduction supplémentaire de l'image de fond */
    body {
        background-image: url("https://minepi.com/wp-content/uploads/2022/11/34-14-11-1024-%C3%97-1024-px-1-1-699x1024.webp");
        background-size: 20%; /* Taille réduite davantage */
        background-repeat: no-repeat;
        background-position: top center;
        background-color: #f6f1f6;
        padding-top: -30px;
    }

    /* Film semi-transparent */
    body::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.7);
        pointer-events: none;
        z-index: 1;
    }

    /* Masquer les autres images */
    .background-left,
    .background-right {
        display: none;
    }

    /* Footer toujours au-dessus */
    footer {
        background-color: #2c2a2e;
        position: relative;
        z-index: 2;
    }

    /* Réduction de la taille du logo */
    .header-logo {
        max-width: 100px;
    }
}
